package com.hui.xiao.xiaohui.ui;

import android.app.TabActivity;
import android.os.Bundle;
import android.widget.TabHost;

import com.hui.xiao.xiaohui.R;

/**
 * Created by Administrator on 2016/5/21.
 */
public class TabHostTest extends TabActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab_host);
        TabHost tabHost = getTabHost();

        TabHost.TabSpec tab1 = tabHost.newTabSpec("tab1")
                .setIndicator("已接来电")
                .setContent(R.id.tab01);
        tabHost.addTab(tab1);

        TabHost.TabSpec tab2 = tabHost.newTabSpec("tab2")
                .setIndicator("呼出电话", getResources().getDrawable(R.drawable.aboc_s))
                .setContent(R.id.tab02);
        tabHost.addTab(tab2);

        TabHost.TabSpec tab3 = tabHost.newTabSpec("tab3")
                .setIndicator("未接来电")
                .setContent(R.id.tab03);
        tabHost.addTab(tab3);

    }
}
